package at.mensch;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

public class Player {
	int playerId = 0;
	String username = null;
	
	private static final Logger LOG = Logger.getLogger(Player.class);
	
	private List<Pawn> pawnList = new ArrayList<Pawn>(4);
	Map<HomeField,Pawn> heim = new HashMap<HomeField, Pawn>(4);
	Map<FinishField, Pawn> ziel = new HashMap<FinishField, Pawn>(4);
	
	public void initHomeFields(List<HomeField> hf, List<Pawn> p){
		int i = 0;
		for(HomeField f : hf){
			if(i < p.size()){
				heim.put(f, p.get(i));
			}else{
				heim.put(f,null);
			}	
			i++;
		}
	}
	public List<Pawn> getPawnList() {
		return pawnList;
	}

	public void setPawnList(List<Pawn> pawnList) {
		this.pawnList = pawnList;
	}

	public Map<FinishField, Pawn> getZiel() {
		return ziel;
	}

	public void setZiel(Map<FinishField, Pawn> ziel) {
		this.ziel = ziel;
	}
	
	public Map<HomeField, Pawn> getHeim() {
		return heim;
	}

	public void setHeim(Map<HomeField, Pawn> heim) {
		this.heim = heim;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public int getPlayerId() {
		return playerId;
	}

	public void setPlayerId(int playerId) {
		this.playerId = playerId;
	}
	
}
